<?php

namespace app\shop\controller;

use think\Controller;
use buildView\Form;
use buildView\Grid;
use app\shop\model\ShopExpress;

/**
 * 物流管理
 * Class Wuliu
 * @package app\admin\controller
 */
class Express extends Controller
{
    /**
     * 列表
     * @auth true
     * @menu true
     * @return string
     */
    public function index()
    {
        $grid = new Grid(new ShopExpress);
        $grid->model();
        $grid->setTitle('快递公司管理');
		$grid->express_code('物流公司编号');
		$grid->express_title('物流公司名称');
		$grid->create_at('添加时间');
		$grid->actions(function ($action){
		    $action->hideDetail();
        });
		$grid->setFromOpen();
		$grid->hideExportButton();
        return $grid->view();
    }


    /**
     * 添加/编辑
     * @auth true
     * @menu true
     * @return string
     */
    public function form()
    {
        $form = new Form(new ShopExpress);
		$form->text('express_code','物流公司编号')->required();
		$form->text('express_title','物流公司名称')->required();
        return $form->view();
    }
}
